package com.three.sb_group3.controller;

import com.three.sb_group3.entity.Movies;
import com.three.sb_group3.service.MoviesService;
import com.three.sb_group3.service.UsersService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("Movies")
public class MoviesController {
    @Resource
    private MoviesService moviesService;
    //电影信息展示 翟艳芳
    @RequestMapping("list")
    public List<Movies> moviesList() {
        List<Movies> result = moviesService.moviesList();
        return result;
    }
    //电影管理:添加电影 王旭超
    @RequestMapping("admin")
    public List<Movies> moviesAdmin() {
        List<Movies> result = moviesService.moviesAdmin();
        return result;
    }


    //评论互动：增加点赞数 周冰倩
    @RequestMapping("likes")
    public List<Movies> moviesLikes() {
        List<Movies> result = moviesService.moviesLikes();
        return result;
    }

    //电影管理:编辑电影信息 陈浩翔
    @RequestMapping("edit")
    public List<Movies> moviesEdit() {
        List<Movies> result = moviesService.moviesEdit();
        return result;
    }

    //发表评论：文字评论 张孜怡
    @RequestMapping("comments")
    public List<Movies> moviesComments() {
        List<Movies> result = moviesService.moviesComments();
        return result;
    }
    //电影管理：删除电影信息
    @RequestMapping("delete")
    public List<Movies> moviesDelete() {
        List<Movies> result = moviesService.moviesDelete();
        return result;
    }
    //电影的搜索与筛选：按年份日期,类型,点赞等 张艳源,潘是宏
    @RequestMapping("search")
    public List<Movies> moviesSearch() {
        List<Movies> result = moviesService.moviesSearch();
        return result;
    }

}
